<layout name='Layout/layout_main' />
<tagLib name="html" />
<link type="text/css" href="__PUBLIC__/css/jquery-ui.css" rel="stylesheet"/>
<script type="text/javascript" src="__PUBLIC__/js/jquery-ui.min.js"></script>
<script type="text/javascript">
	// 加载编辑器
	function attach_down(obj){
	winopen("{:U('down')}&attach_id="+$(obj).atli("file_id"),600,300);
	return false;
	}
	function edit(){
	parent.window.location.href="{:U('edit?id='.$vo['id'])}";
	myclose();
	}
	function next(){
	<empty name="next">
		alert('没有下一个');
	<else />
		window.location.href="{:U('read?id='.$next.'&list='.$list)}";
	</empty>
	}
	function prev(){
	<empty name="prev">
		alert('没有上一个');
	<else />
		window.location.href="{:U('read?id='.$prev.'&list='.$list)}";
	</empty>
	}
	$(function(){
		$( "#slider-range-priority" ).slider({
			range: "min",
			min: 1,
			max: 5,
			value: {$vo.priority},
			slide: function( event, ui ) {
				$( "#priority" ).val(ui.value);
				$("div.slider_box div.ui-slider").css( "background-color", schedule_bg(ui.value));
				$("div.slider_box div.ui-widget-header").css( "background-color", schedule_bg(ui.value));
			}
		});	
		$("div.slider_box div.ui-slider").css( "background-color", schedule_bg({$vo.priority}));
		$("div.slider_box div.ui-widget-header").css( "background-color", schedule_bg({$vo.priority}));
	})

	$(document).ready( function(){
	fill_time("start_time");
	fill_time("end_time");
	show_content();
	});</script>
<body>
<div class="schedule">
	<div class="row-fluid title">
		<span>{$vo.name}</span>
	</div>
	<div class="operate">
		<div class="left">
			<a onclick="prev();">上一个</a>
			<a onclick="next();">下一个</a>
		</div>
		<div class="right">
			<a onclick="edit();">编辑</a>
		</div>
	</div>
	<form method='post' id="form_data" name="form_data" enctype="multipart/form-data">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="add_file" name="add_file">
		<div class="form">
			<ul>
				<li class="span-6">
					<span> <b>开始</b>
					</span>
					<p>{$vo.start_date}&nbsp;{$vo.start_time|fix_time}</p>
				</li>
				<li class="span-6 last">
					<span> <b>结束</b>
					</span>
					<p>{$vo.end_date}&nbsp;{$vo.end_time|fix_time}</p>
				</li>
				<li class="span-6">
					<span>
						<b>地点</b>
					</span>
					<p>{$vo.location}&nbsp;</p>
				</li>
				<li class="span-6 last">
					<span>
						<b>优先级</b>
					</span>
					<div class="auto">
						<input type="hidden" id="priority" name="priority"/>
						<div class="slider_box">
							<div class="left" style="padding-right:12px">低</div>
							<div id="slider-range-priority"></div>
							<div class="left"  style="padding-left:12px">高</div>
						</div >
					</div>
				</li>
				<li class="span-12 last">
					<span>
						<b>参与人员</b>
					</span>
					<p>{$vo.actor|show_contact}&nbsp;</p>
				</li>
				<li class="span-12 last">
					<span>
						<b>附件</b>
					</span>
					<div class="auto">{$vo.add_file|Showfile} &nbsp;</div>
				</li>
				<li class="span-12 last">
					<label>
						<span>
							<b>内容：</b>
						</span>
						<div class="auto">
							<div id="content_wrap" >
								<iframe id="content_iframe"></iframe>
							</div>
							<textarea id="content_1" name="content" style="width:100%;height:180px;display:none;">{$vo.content}</textarea>
						</div>
					</label>
				</li>
			</ul>
		</div>
	</form>
</div>
<div style="clear:both"></div>